package com.mew.lobby.message.response;

import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.*;

import java.util.List;

/**
 * @Description: TODO
 * @Author King.Song
 * @Date 2020/11/14 0014
 **/
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class GameListResponseMessage extends ZebraBaseMessage<GameListResponseMessage> {

    private List<GameInfoMessage> list;


    @Override
    public void write(ByteBuf b) {


        int size = list.size();
        writeInt(b, list.size());
        for (int i=0; i<size; i++){
            list.get(i).write(b);
        }
    }

    @Override
    public GameListResponseMessage read(ByteBuf byteBuf) {
        return null;
    }
}
